using UnityEngine;
using QFramework;

namespace SnakeGame
{
    public class GameLoop : MonoBehaviour, IController
    {
        private ITimeSystem timeSystem;
        private IInputSystem inputSystem;

        private void Start()
        {
            timeSystem = this.GetSystem<ITimeSystem>();
            inputSystem = this.GetSystem<IInputSystem>();
        }
        private void Update()
        {
            timeSystem.OnUpdate();
            inputSystem.Update();
        }
        IArchitecture IBelongToArchitecture.GetArchitecture() => SnakeGame.Interface;
    }
}